package de.home.spring.backend.hibernate;

import java.util.List;

import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import de.home.spring.backend.IDAO;
import de.home.spring.beans.Person;

public class PersonDAOH extends HibernateDaoSupport implements IDAO<Person> {

	/**
	 * 
	 */
	private static final long serialVersionUID = 3912329222878587204L;

	public List<Person> selectAll() {
		List<Person> persons = getHibernateTemplate().find("from Person");
		return persons;
	}

	public void write(Person person) {
		getHibernateTemplate().save(person);	
		
	}

}
